#region Using directives

using System;
using System.Collections.Generic;
using System.Text;

#endregion

namespace Weazel.Gezel.Simulator.Reference
{
/// <summary>
/// Emulate "typedef long Symid;"
/// </summary>
  public struct Symid
  {
    public static readonly Symid NOSYMBOL = unchecked((long)-1);
    public long val;

    public static implicit operator long(Symid s)
    {
      return s.val;
    }

    public static implicit operator Symid(long s)
    {
      Symid sym;
      sym.val = s;
      return sym;
    }

    public static implicit operator Symid(uint s)
    {
      Symid sym;
      sym.val = s;
      return sym;
    }

    public static implicit operator uint(Symid s)
    {
      return unchecked((uint)s.val);
    }

    public static implicit operator int(Symid s)
    {
      return unchecked((int)s.val);
    }

    public override string ToString()
    {
      return "" + val;
    }
  }
}